package com.service.impl;

import com.dao.DutyRecordDao;
import com.pojo.DutyRecord;
import com.service.DutyRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DutyRecordServiceImpl implements DutyRecordService {

    @Autowired
    DutyRecordDao dutyRecordDao;

    @Transactional
    @Override
    public List<DutyRecord> selectAll(String param) {
        return dutyRecordDao.selectAll(param);
    }

    @Transactional
    @Override
    public Integer addRecord(DutyRecord dutyRecord,Integer buildId) {
        return dutyRecordDao.addRecord(dutyRecord,buildId);
    }

    @Transactional
    @Override
    public Integer deleteByUsername(String username) {
        return dutyRecordDao.deleteByUsername(username);
    }
}
